package cn.hacynn.nd.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Share implements Serializable {
    @TableId
    private String id;

    private String fileName;

    private String fileType;

    private String userName;

    @TableField( value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(exist = false)
    private String createTimeStr;

    //过期时间
    private Date expireTime;

    @TableField(exist = false)
    private String expireTimeStr;

    private Boolean hasExpired;

    private String url;

    @TableField("user_id")
    private Long userId;

    @TableField("file_path")
    private String filePath;

    @TableField("size")
    private Long size;

    @TableField("view_count")
    private Integer viewCount;

    @TableField("download_count")
    private Integer downloadCount;

    @TableField("transfer_count")
    private Integer transferCount;

    @TableField("status")
    private Integer status;

    @TableField("is_encoded")
    private Boolean isEncoded;

    @TableField("code")
    private String code;

    @TableField(exist = false)
    private String shareUrl;

    @TableField(exist = false)
    private String statusDesc;
    private static final long serialVersionUID = 1L;

}